
import 'Calendars.dart';
import 'my_add_calendar_platform_interface.dart';

class MyAddCalendar {
  static Future<String?> getPlatformVersion() {
    return MyAddCalendarPlatform.instance.getPlatformVersion();
  }

  //添加事件
  static Future<String> createEvent(Calendars calendars) {
    return MyAddCalendarPlatform.instance.createEvent(calendars);
  }

  //删除提醒事件
  static Future<bool> deleteEvent(String eventId) async{
    return MyAddCalendarPlatform.instance.deleteEvent(eventId);
  }

  //更新提醒事件
  static Future<String> updateEvent(Calendars calendars) async {
    return MyAddCalendarPlatform.instance.updateEvent(calendars);
  }

  //查询是否有读权限
  //若无，自动请求权限
  // ignore: non_constant_identifier_names
  static Future<bool> checkReadPermission() async{
    return MyAddCalendarPlatform.instance.checkReadPermission();
  }

  //查询写日历的权限
  //若无，自动请求权限
  // ignore: non_constant_identifier_names
  static Future<bool> checkWritePermission() async{
    return MyAddCalendarPlatform.instance.checkWritePermission();
  }
}
